import { defHttp } from "@/utils/http/axios";
import { NotifyApi } from "@/enums/apiEnum";
import { NotifyModel } from "./notifyModel";
import qs from "qs";


/**
 * 根据接收者id和类型获取通知
 * @param receiveId 接收者id 
 * @param type   类型
 * @param state  状态 0 未读 1已读
 * @returns 
 */

export function getListByReceiveIdAndType(receiveId: number, state: number, type?: number) {
  return defHttp.get<Array<NotifyModel>>({ url: NotifyApi.GetListByReceiveIdAndType, params: { receiveId: receiveId, type: type, state: state } })
}

export function getInfoByMsgIds(msgIds: Array<number>) {
  return defHttp.post({ url: NotifyApi.ListByIds, data: msgIds })
}